package descentFly.app.dialogs
{
	import UIFree.ObjectEvent;
	
	import descentFly.app.df_events;
	import descentFly.app.df_modalLayer;
	
	public class df_enterLoginWindow extends df_baseLoginWindow {
		public function df_enterLoginWindow(parent:df_modalLayer, descr: String='') {
			super(parent, descr);
		}
		
		override protected function loginComplete(a_login: String, a_passwordEncrypt: String): void {
			dfApp.player.loginUser(a_login, a_passwordEncrypt, function(isLogin: Boolean): void {
				if (isLogin) close();
				else parentLayer.dispatchEvent(new ObjectEvent(df_events.ALERT, locale.LOGINNOCORRECT));
			});
		}		
	}
}